package com.kl.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("car")
@ApiModel(value="Car对象", description="")
public class Car extends Model<Car> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id自增")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "(车的类型 1小卡 2大卡 3重汽 4轻型货运 5冰鲜)")
    private Integer carType;

    @ApiModelProperty(value = "车牌号")
    private String carNumber;

    @ApiModelProperty(value = "所属站点")
    private String site;

    @ApiModelProperty(value = "车辆司机")
    private Long carDriver;

    @ApiModelProperty(value = "车辆里程数")
    private String carMileage;

    @ApiModelProperty(value = "车辆载重")
    private String carLoad;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "送达时间")
    private Date endTime;

    @ApiModelProperty(value = "发车")
    private String lineRange;

    @ApiModelProperty(value = "车辆登记")
    private String carRegister;

    @ApiModelProperty(value = "(当前状态1:空闲,2:运行中,3维修保养,4报废,)")
    private String state;

    @TableField("deletes")
    @ApiModelProperty(value = "逻辑删除字段:2删除")
    @TableLogic
    private Integer deletes;

    @ApiModelProperty(value = "今日拉货次数")
    private Integer todayCount;

    @ApiModelProperty(value = "终点站点")
    private String lineRange2;

    @ApiModelProperty(value = "加入时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "退役时间")
    private Date ebdTime;


}
